Datagridview Column order problem Difference Designer-program Hello I have a problem with the Column order in my Datagridview. in the Designer i added all Columns i need and set the right DataPropertyName. the problem i have now is, that the Order in the program is totally different to the order i choose in the Designer The Columns in the designer look like ID Name Familyname Street Houseno and some invisible columns In the Program the order is ID Stret Name Housno Familyname I also tried to set the displayindex for each column in the constructor, but this didnt work either. Another weired thing is, when i write the displayindex of eg. Street in the output, it is the correct index 4, but it is displayed on 2 Is this a known problem regards thomas Tag: Windows Forms General TreeView under Windows 98 Windows Forms
Save File Dialog. (I have code, just need a little help fixing) Hey,
Ok, so I did the save FIle dialog code and it works fine. But I can't figure out how to amke it so thta is will save the contents of the current page in the webbrowser. Here is the code:
private void savePageToolStripMenuItem_Click( object sender, EventArgs e)
{
Stream myStream = null ;
SaveFileDialog saveFileDialog1 = new SaveFileDialog ();
saveFileDialog1.InitialDirectory = "c:\\" ;
saveFileDialog1.Filter = "Webpage Html (*.html)|*.html|Text File (*.txt)|*.txt" ;
saveFileDialog1.FilterIndex = 2;
saveFileDialog1.RestoreDirectory = true ;
if (saveFileDialog1.ShowDialog() == DialogResult .OK)
{
try
{
if ((myStream = saveFileDialog1.OpenFile()) != null )
{
using (myStream)
{
}
}
}
catch ( Exception ex)
{
MessageBox .Show( "Error: Could not save file from Browser. Original error: " + ex.Message);
}
}
}
Thanks :) Tag: Windows Forms General TreeView under Windows 98 Windows Forms
.net framework 3.0 unable to install I would like to install .net 3.0 as it is a required part of the new Expression studio. However, during the installation process, it often launches an error message: EventType : wap10setup P1 : 13855 P2 : 3.0.04506.30_waprtm_x86_sfx P3 : pr P4 : inst P5 : f P6 : 00570049004300206470F426003F8754F55D003F P7 : baseret_failure P8 : - P9 : 1603 P10 : 004D00530058004D004C00200036002E00300020003FE87D003F I have installed .net compact 1.0 SP3, .net compact 2.0, .net 1.1 and .net 2.0 before. I really need the .net 3.0 but I am just a computer beginner. I am so perplexed. Where should I go from there Any help will me much appreciated. Kind regards Tag: Windows Forms General TreeView under Windows 98 Windows Forms
detect user inactivity (idle, timeout) I know this question has been addressed recently but bear with me.
My application (vb.net 2005) consists of several forms in a hierarchy that present
info to the user. Form1 calls form2 (showdialog) which calls form3 etc...
I want the forms to timeout and return to form1 if the user walks away (ok, its a kiosk app)
Each form has its own timer(system.win.forms.timer). When this matures the click
event closes preceding forms and then itself, returning the system to form1.
Some forms consist of nothing but labels and text boxes. I can easily detect activity
in the text boxes and reset the timer (timer.stop,timer.start seems to do the trick)
But form3 presents a PDF within a webbrowser control. I can't detect activity
within this control. I've tried the following :-
1. form.keypreview / form.keypress
2. webbrowser.navigating, does nothing once doc is loaded
3. form implements ImessageFilter does not report movement within webbrowser
4. API SetWindowsHookEx again does not work within the PDF
The last method I got from http://support.microsoft.com/Default.aspx id=319524
In the last paragraph it says "You cannot implement global hooks in Microsoft .NET Framework"
Is this the crux of the problem
Looking forward to your thoughts.
M. Tag: Windows Forms General TreeView under Windows 98 Windows Forms
FORM CLOSE ISSUE Hi Guys,
I am writing an application and within this app obviosuly have numerous Forms opening from other forms. For example:
private void btnShowShifts_Click( object sender, EventArgs e)
{
//show list of shifts
showshifts newShowShifts = new showshifts ();
newShowShifts.ShowDialog();
}
When I then close the form opened above using the following:
private void btnClose_Click( object sender, EventArgs e)
{
this .Close();
}
It shuts down that form PLUS the original form from above, leaving me back at my "main menu" form.
I'm sure in the past I've done this without this happening, in fact 1 other form in my app closes only the 1 form.
What am I doing wrong
Thanks
Jon Tag: Windows Forms General TreeView under Windows 98 Windows Forms
How to Refresh controls quickly?? Hi all,
In my App the main form has got many controls on it. (Text Boxes, Combos, updown controls, panels)
After running the App for about 1/2 an hour or so.... the refresh rate is so low, that it seems as if the system got hanged.
Is there any way, I can quickly refresh the controls on the form even if the App is run for a long duration
How can I solve this problem of repainting the controls on the form
Anybody.....pls help me out.
Thank you. Tag: Windows Forms General TreeView under Windows 98 Windows Forms
VB: How to toggle the windowstate (minimize-to-normal) of a borderless form when clicked on the taskbar? When a form has its FormBorderStyle = FixedSingle (or other option) and ControlBox = False, it can be minimized through a minimize custom button with the following code:
Me .WindowState = Form.WindowState.Minimized
Once minimized in the taskbar, the windowstate can be toggled automatically from the taskbar, if you click on the minimized app in the taskbar it will change to windowstate=normal, if you click on it again in the taskbar, it will change to windowstate=minimized.
But when FormBorderStyle = None, this toggle mode stops working, the window will no longer restore its Normal windowstate, so now the windowstate toggle has to be done programmatically through other events such Form_Load(),Form_Activated(), Form_Resize().
I tried all the possible solutions I know of, nothing seems to work, maybe an API call will do.
How the windowstate toggled from the taskbar in a borderless, controlbox-less form
VISUAL BASIC Solutions please. Tag: Windows Forms General TreeView under Windows 98 Windows Forms
Extended OpenFileDialog Hi everyone, I'm trying to make a custom OpenFileDialog that select files and folders, the original one just returns the selected files even if I select files and folders in the dialog. So my ideia is to make a custom usercontrol to allow the openfiledialog to return both selected files and folders (once the dialog allows selecting folders maybe I can return folders to) This is an ideia but I don't know if this is possible and if is, how to handle the ok button click event. Any help appreciated Cheers Tag: Windows Forms General TreeView under Windows 98 Windows Forms
MDI form - menu of child forms (MdiWindowListItem) - restrict entries ? I would like to restrict the menu of MDI child forms (MdiWindowListItem) to only a subset of the current children.
Is it possible for an MDI child form to choose NOT to register itself with the MdiWindowListItem menu
Can I manually remove unwanted entries from the menu
Or, is my only option to forego the automation of the MdiWindowListItem facility and build the menu myself
PS this menu shows, by default, the Text property of the child form - can I set this to anything else Tag: Windows Forms General TreeView under Windows 98 Windows Forms
Is DataBindingComplete the proper place to add user columns Hi,
I need to add some columns to my table so that I can use the maskededitcolumn control. I am doing this is the DataBindingComplete event handler. Is this the proper place
A second question is I have noticed that the DataBindingComplete event gets called many times. Can someone define under what conditions DataBindingCompleted is fired
Thanks,
Jerry Tag: Windows Forms General TreeView under Windows 98 Windows Forms
finding the monday date of a given date In sql I can find the monday date of any given date with the following
select DATEADD(wk, DATEDIFF(wk,0,getdate()), 0)
I need to rename the header text of 30 col to be the monday date for the prev week, this week,
this week+1, +2..... this week +30
but there is no week value for an interval
please help Tag: Windows Forms General TreeView under Windows 98 Windows Forms
exporting button images Is there way to export image to file which is shown as System.Drawing.Bitmap and it is Local Resource in Resource context if button |...| pressed. Tag: Windows Forms General TreeView under Windows 98 Windows Forms
Progress Bar - Controlling From a Class Normally when I work with a progess bar, the code to update the bar is on the same form that the progress bar resides.
On my current project, my form calls a class that performs several loops and I would like to control the progress bar updates from
inside the class, but can not figure how to control it.
Anyone get me started in the right direction
Thanks Tag: Windows Forms General TreeView under Windows 98 Windows Forms
Saving and restoring Windows form states I'm developing a windows form application which allow users to query the database.
When users press the reset button, the windows form will go back to the initial state(resetting all the controls in the windows form to initial state)
I've thought of the followings to achieve this
1) Put all the resetting codes inside the reset button event.
2) Use serialization
3) Close the windows form and create a new windows form.
But I think there may have some better ways.Can anyone advise me
Thanks Tag: Windows Forms General TreeView under Windows 98 Windows Forms
MDI and OutOfMemoryException Hi,
I have this code that makes the form as an MDIChild:
chartWindowController.GetForm().MdiParent = _expertTradeMainFrm; chartWindowController.GetForm().WindowState = FormWindowState.Normal; chartWindowController.GetForm().Show();
The above code snippet throws exception when Show() is called:
Message "Object reference not set to an instance of an object."
StackTrace " at System.Windows.Forms.ToolTip.CreateHandle()\r\n at System.Windows.Forms.ToolTip.get_Handle()\r\n at System.Windows.Forms.ToolTip.WmWindowPosChanging(Message& m)\r\n at System.Windows.Forms.ToolTip.WndProc(Message& msg)\r\n at System.Windows.Forms.ToolTip.ToolTipNativeWindow.WndProc(Message& m)\r \n at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n at Microsoft.Win32.SafeNativeMethods.MessageBox(HandleRef hWnd, String text, String caption, Int32 type)\r\n at System.Diagnostics.AssertWrapper.ShowMessageBoxAssert(String stackTrace, String message, String detailMessage)\r\n at System.Diagnostics.DefaultTraceListener.Fail(String message, String detailMessage)\r\n at System.Diagnostics.DefaultTraceListener.Fail(String message)\r\n at System.Diagnostics.TraceInternal.Fail(String message) \r\n at System.Diagnostics.Debug.Fail(String message)\r\n at CimsFramework.CimsSecurity.CmsUsrDataSheetSubModule.GetDataEntryInfo() in D:\\CIMS.NET\\CimsFramework\\CimsSecurity.cs:line 4127"
But when the same is not a MDIChild then it works fine i.e., if I comment the line chartWindowController.GetForm().MdiParent = _expertTradeMainFrm, then the application works fine.
I have Visual Team Edition 2005 for Developers + Windows XP Sp2.
Can anyone let me know why this is happening or how to fix it. Thanks in advance.
Regards Kiran Tag: Windows Forms General TreeView under Windows 98 Windows Forms
Authrntication and Clickonce Hi all,
I'm trying to use the clickonce technology to install my application. I put the publish directory in my IIS web server and every thing is OK. But, not every one can get the link of the publish and install my application on his PC. Is there away to do the downloading using authentication with username and passowrd.
Regards... Tag: Windows Forms General TreeView under Windows 98 Windows Forms
Draw on another display I have an application in which I would like to play a video in full screen on another display. I am able to list all connected display devices using the System.Windows.Forms.Screen class, and I have no problem playing a video in full screen using Microsoft.DirectX.AudioVideoPlayback.Video. However, I am unable to figure out how to display this on another monitor. I am fully aware that I will likely have to create a form on the second display and play the video from there, but as far as I can tell there is no way to do this from the Screen class. Tag: Windows Forms General TreeView under Windows 98 Windows Forms
GDI+ button image painting problem Hi,
Actually, I have an application that
is using .Net Framework 1.1. I am doing custom painting of controls which is a
requirement due to the look of the controls. The problem that I am facing is the
painting of buttons. As the buttons have bitmaps applied to them which give them
the desired look, their repainting time is very
slow.
I dragged the windows calculator on
the form rapidly and found that the buttons remained unpainted for quite a while
whether the calculator was frequently dragged over them or not and the
background turned white and as soon as the calculator was halted, they suddenly
got painted. If I reduce the pace of calculator drag, the buttons will slowly
but surely get painted. I load png files and merge them to create a bitmap in order
to apply it to the button. I have tried to profile and then optimize the code as
well. I have also used double buffering and have already cached the button
bitmaps but it hasn¡¯t made much difference. At the moment it seems that I can not do much regarding
this behavior as .Net DrawImage(), DrawString(), setting the text rendering hint
to anti alias and setting the button region is taking most of the time. I have
also tried to use DrawImageUnscaled() but the image gets deteriorated while the
calculator is moved. I think I cannot do much now and
this seems to be a problem of GDI+ performance. Please suggest any idea about
what should I try now. Another thing which I wanted to ask was the usage of
Managed DirectX. Please suggest whether this would be better for painting
buttons having bitmaps as I desperately want to improve the painting performance and I think DirectX is my last hope. Tag: Windows Forms General TreeView under Windows 98 Windows Forms
DataGridView.CellValidating event problems I am having many problems with the CellValidating event. In many cases while editing cells and focus is moved elsewhere in the app (other focusable controls), the CellValidating event does not fire. Since this is the only means I know of by which to capture the leaving of a cell being edited so I can validate, I'm stuck. Do I need to go get a 3rd party grid Or write my own (again)
Thanx
WNC Tag: Windows Forms General TreeView under Windows 98 Windows Forms
Syncronize scrolling of 2 dataGridView's in C# I have two dataGridView's that after filtering will always have the same number of rows and I would like to be able syncronize the scrolling, ie: scrolling either grid would scroll the other in sync. Is this possible
jzirbes Tag: Windows Forms General TreeView under Windows 98 Windows Forms
Find Target and Change Icons buttons are disabled for desktop Shotcut of my application Dear All,
I have made a setup of a C# window application in which i create an icon on the desktop. But the problem with this shortcut is that whenever i right click on it & go to property, its Find Target and Change Icon buttons are disabled. The difference that i have observed between other standard applications shortcuts and this one is that its Target Location on the property page is not set which are set for other ones whereas Target property just points to the name of the application.
Please guide me as soon as possible so that i could solve this problem.
Regards,
Wasif Ehsan. Tag: Windows Forms General TreeView under Windows 98 Windows Forms
Using IMenuCommandService I have application that is using IDesignerHost so my users can design dashboards at runtime. I got the IDesignerHost and INameCreationService, ISelectionService and IUIService services implemented and working but I cannot get IMenuCommandService implemented besides 'Delete'. I have found examples but it looks like they are all for component integration in the IDE. Does anybody know of some examples for my scenario
Regards, Tag: Windows Forms General TreeView under Windows 98 Windows Forms
C# How do I keep GroupBoxes seperate? Hi Everyone,
I am using C# 2005 building a Windows Form application.
I am trying to build an interface to a multimeter. I have several GroupBoxes which contain switch controls to set the required range for, say DC Volts or AC Volts.
The code for all this is long winded, but is not causing me a problem.
What is causing the problem is that I need to have all the groupBoxes occupying the same space on the form and hide and show them depending upon whether, say, the DC Volts or AC Volts or what ever function is selected.
With the GroupBoxes occupying different areas of the form, my hide and show code works fine. However, as soon as I overlay one GroupBox with another one, the visiblilty control for each GroupBox stops working and the 'bottom' GroupBox appears to control the visibility of all the other GroupBoxes.
I have tried this on a simply test program and see exactly the same problem.
I can see what is happening in FORM.DESIGNER.CS. However, I really don't want to have to work through this and recode everything by hand. Is there any way to stop this happening
Many thanks for your time
John822179
Live long, prosper and understand C# Tag: Windows Forms General TreeView under Windows 98 Windows Forms
Add Datagridview On Combobox Hi, I stuck at combobox . I wanna use my combobox to render a datagrid at his item. How can I do that Now I still do a trouble trick makes my design horrible. I use a form that include datagridview control then it'll show when i call combobox dropdown event. Can Anyone tell me a trick or class to solve this Any support maybe fine to me Tag: Windows Forms General TreeView under Windows 98 Windows Forms
error during runtime of usercontrol Hi Everyone,
I'm upgrading a usercontrol from VB6 to VB2005. I didn't write the original code so I'm not entirely sure how it works (and this is my first usercontrol!). The usercontrol itself has no errors and I've added it successfully to a form in another project. However, when I try to run that project I get this error:
An error occurred creating the form. See Exception.InnerException for details.
The error is: Get not supported at runtime.
My first guess was that there was something wrong with the properties as they have "Get" statements in them. But they seem to be structured correctly. An example:
Public Property Belt_Width() As Single
Get
Belt_Width = m_Belt_Width
End Get
Set ( ByVal Value As Single )
m_Belt_Width = Value
RaiseEvent Belt_WidthChange()
Call Calculate()
Call Calculate()
If Me .Auto_Calculate = True And Me .Redraw_Graphics = True Then g.Clear(Color.White)
Call Calculate()
End Set
End Property
There's lots of these.
What I'm hoping is that someone has a more specific reason for this error or an idea where I can look for the problem because right now I have no idea.
Thanks for the help!
Jess Tag: Windows Forms General TreeView under Windows 98 Windows Forms
Using XML as a file-type database in WinForms applications Hi guys/gals! I read an article on 'visualbasic.about.com' (can't remember th exact URL) but it explained the use of XML as a database for applications. Now I currently have a working application that is using SQL Server 2005 Express as its db. For reasons such as users having to install the DBMS on the machines, the large setup file for deploying with SQL Server as a prerequisite, and mor on the lines that my database has only 2 small tables with one foreign key relation between them, and the data should not contain more than 50 rows in Table1 and 15 in Table2. Would I be able to work with XML as a file-type database in this regard, or would u deem it not feasible taking into account the above-mentioned If this is feasible as a more "light-weight" solution, how should I go about my business Can I create a dataset representation of my tables in the Dataset Designer and then persist that to an XML file Please could someone shed some light on this for me, or direct me to a step-by-step article or video Thank you and kind regards! shalan Tag: Windows Forms General TreeView under Windows 98 Windows Forms
Implementing SnapLines at RunTime Hi Guys We are in the process of developing a graphics design package using VB.NET 2005. The SnapLines feature in the IDE is excellent and it's the sort of feature we want to implement to align boxes etc automatically. My question then is does anyone know how to implement the SnapLines functionality at RunTime Many Thanks Darm Tag: Windows Forms General TreeView under Windows 98 Windows Forms
Get properties of Form from thread Hi, i am using C++/CLI 2005 and trying get properties of Form from thread.
In Form.h
#include "thread.h"
#pragma once
namespace pag34 {
...[ ]
private : System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
MyThreadPrue ^MyThr = gcnew MyThreadPrue();
Thread ^Thr2 = gcnew Thread( gcnew ParameterizedThreadStart(MyThr,&MyThreadPrue::VentanaX));
Thr2->Start( this );
}
In Thread.h
#ifndef SysThread_h
#define SysThread_h
ref class MyThreadPrue
{
public :
static void StaticThreadPrueb();
static void VentanaThr();
void VentanaX(Object ^name);
};
#endif
In Thread.cpp
#include "thread.h"
//using namespace System::Windows::Forms;
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace System::Threading;
void MyThreadPrue::StaticThreadPrueb()
{
for ( int i = 0; i < 10; i++)
{
MessageBox::Show( "Thread GO!" );
}
}
void MyThreadPrue::VentanaThr()
{
//Form ^Form1 = gcnew Form;
}
void MyThreadPrue::VentanaX(System::Object ^name)
{
Form ^MiForm = gcnew Form;
MiForm ^ob = (MiForm^) name;
}
---- EOF SOURCE -----
The ob object dont create and give error, and i dont get properties of form1.
Any idea Tag: Windows Forms General TreeView under Windows 98 Windows Forms
How do I have richtext dublicate in a new tab? Ok, I am trying to make a scripting editor in C# and I want my editor so you can create a new tab and have a "new" rich text area on it. I don't want my richtext that you already made move to a new tab. So if someone can tell me so if I can disable the richtext from moving and just create a new one on the new tab please tell me! Code:
Code Snippet
private void newTab(object sender, EventArgs e) { if (rtb != null) { tabPage1 = new TabPage("Untitled"); tabPage1.Controls.Add(rtb); tabPage1.AutoScroll = true; rtb.Dock = System.Windows.Forms.DockStyle.Fill; this.tabs.TabPages.Add(tabPage1); rtb.Multiline = true; rtb.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.ForcedBoth; rtb.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); tabs.SelectedTab = tabPage1; } } Tag: Windows Forms General TreeView under Windows 98 Windows Forms
Drawing on[/underneath!] Controls Is it possible to draw a line as shown in the pic on a single form The line in the image is drawn on a second form which is transparent so form1 is visible. Tag: Windows Forms General TreeView under Windows 98 Windows Forms
How to store a pdf, excel, or word document into a sql database as attachment Can someone show me a example how to store a pdf or document like excel into a sql database. Im using vb 2005 and sql 2005.
thanks for taking the time to read this. Tag: Windows Forms General TreeView under Windows 98 Windows Forms
report generator Hello there,
I work with Visual Studio 2005 Pro and C# 2.0. What is the best report generator
Thanks in advanced,
CLA. Tag: Windows Forms General TreeView under Windows 98 Windows Forms
nightwalker_ua
Tooltips of TreeView under Windows 98 works incorrect. How I can reduce this problem
Re: Windows Forms General TreeView under Windows 98
Tweetie81
I have had this problem also a few months ago. The tooltip of treeviews gives junk characters (or squares), and after a while, the application even crashes! No idea what the cause is, in the meanwhile I disable tooltips on treeviews when software runs on Win98 machines.
Must be a bug in .NET. The COMMCTRL32.DLL is good, because other applications have no problems, only C#.NET apps.