|
Since all Controls normally get created by the main thread (aka "GUI thread")
and should be handled only by the thread that created them (they are not
thread-safe), one needs a special technique to access them from another thread.
The Control class has some members to support this: the InvokeRequired property
and the Invoke() or BeginInvoke() methods. I suggest you read up on these;
examples are plenty on CodeProject. There is one in my Sokoban article (that's
in C# but the concept is exactly the same).
|
|
|
|
|
How can set focus to a particular tabpage in vb.net 2005
|
|
|
|
|
Isn't there a selected tab property ? Assuming you're asking about winforms.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
indeed there is
and the code would look like this
tabcontrolname.selectedtab = tabpagename
-- modified at 7:57 Tuesday 31st July, 2007
you could also use selectedindex but then this will stop working properly if you change the order of the tabs
|
|
|
|
|
really , thnks my frnd .. its working
|
|
|
|
|
glad to be of assistence
|
|
|
|
|
really thnks my frnd.. its working..
|
|
|
|
|
Hello,
first of all I am new to .net and don't know much about connection pooling. I have read few articles from .net but still don't get answer for few questions.
my boss came to me and told me to do some research on connection pooling and write application that will have six buttons. three button will get connection from pool and other three button will close this connection one by one. I wanted to put one more button to destroy all connection that works fine using Clearallpools but clearpool doesn't work. I can post code here if anyone want to look at it.
Thank you.
Viral
|
|
|
|
|
.NET handles it's own connection pooling, you should not write your own.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
thank you for your reply.
I am not writing my own pooling, just want to know how can I handel pooling and monitor it. I just want to know how it works and what type of problem I can get if we develop project using connection pooling. it will be great if someone tells me if there are any other connection type available for .net.
|
|
|
|
|
|
|
What is the syntax to represent Verbatim literal(@ in C#) in VB.net ?
|
|
|
|
|
There isn't any. All strings denoted by quotes are literal. There are no escape characters in VB.NET.
|
|
|
|
|
Actually, there is one escape character - a double quote is escaped by another double quote.
e.g., Dim s As String = "abc""def"
David Anton
http://www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
C++ to C# Converter: converts C++ to C#
C++ to VB Converter: converts C++ to VB
Instant C++: converts C# to C++/CLI and VB to C++/CLI
|
|
|
|
|
Whoops, forgot about that one! :->
|
|
|
|
|
Hi,
I am trying to take a screen shot of a site loaded in a web browser control. I have placed the code in the document completed event and use the forms DrawToBitmap function to draw it and save the image. i have also verified whether the document has been fully loaded by verifying the url in the WebBrowserDocumentCompletedEventArgs and the readystate property of the control. But to my surprise, it is working fine with a couple of sites, e.g. www.lumun.org and www.nelaam.com but when i try it with google.com,ask.com or msn.com, I ust end up getting a plain white bitmap. I have even tried putting a 60 second time delay ( as i thought that maybe the site takes some time to be loaded and made visible), and could see the page in the web browser control, yet the bitmap for these sites was still plain white :S Any ideas as to why this could be? and what the solution to this is?
Thanks!
Ahmad
|
|
|
|
|
there exist two parameters in the datetime control
momth and year
Format Custom
Custom Format - MMM-yyyy
When i try to change the date it gives the following error
Year, Month, and Day parameters describe an un-representable DateTime.
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
you're problem is the folowing:
today we are the 31th and while you don't display the day the control still has it in his 'memory'
so when you try to go to a month with only 30 day's (for instance june) you are actualy trying to go to '31 june 2007' and that date doesn't exist so he can't display it and gives you're error.
If you really don't want to show the day then I suggest you catch the 'valuechanged' event and check the day
if day=31 then
if month = june then
day = 30
end if
end if
hope this helps
|
|
|
|
|
Can anybody tell me how to make the startup form invisible. The following code snippet in the included MSDN help displays the form for a while and then the form is closed automatically.
' Visual Basic
Sub Main()
' Instantiate a new instance of Form1.
Dim f1 as New Form1()
' Display a messagebox. This shows the application is running,
' yet there is nothing shown to the user. This is the point at
' which you customize your form.
System.Windows.Forms.MessageBox.Show( _
"The application is running now, but no forms have been shown.")
' Customize the form.
f1.Text = "Running Form"
' Show the instance of the form modally.
f1.ShowDialog()
End Sub
reman
|
|
|
|
|
f1.hide = hides the form (however when the form does an new action after the hide it will apear again)
so you might want to use
f1.visible = false
you can put this code in the load but if you want to make sure you're form is never displayed it might be beter to do it in the activated event
hope this helps
|
|
|
|
|
Hi,
this is how I do it (example is C#):
[STAThread]
static void Main() {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Form1 form1=new Form1();
Application.Run();
}
So don't hand over your main form to Run() since that would show it, no matter
what you do to the form's properties.
And be careful to deal with all normal exits PLUS the sessionending stuff
(which normally Run would handle).
|
|
|
|
|
Hi,
It seems that your are trying to build a SplashScreen, if this is what you want:
Go to Project > Add New Item > Splash Screen ... add your touches + Coding
Go to Project > ProjectName Property > Application tab > Splash Screen Drop Down List and select the added form (this will be launched first)
hope this helps
|
|
|
|
|
|
hi all
i need to use a slider on the ruler control but i have no idea how to do that will some one help me on the same
any kind of help will be greatful
thnx in advance
|
|
|
|