|
I'm still trying to work out why someone thought you'd give them VB.NET code, AND felt that we needed to know that the OP is a girl. So what ?
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
|
|
|
|
|
We all know when it comes to technical things girls need all the help they can get.
(Dave runs for cover!)
------------------------------------
"When Belly Full, Chin Hit Chest"
Confucius 502BC
|
|
|
|
|
That's rather a sexist remark, don't you think?? I work with two girls, one of whom holds a CISSP, who can kick my ass, technically.
|
|
|
|
|
Once more Irony becomes remains an English Phenomenon!
note the "Dave Runs For Cover" line!
It was humour, not serious!
------------------------------------
"When Belly Full, Chin Hit Chest"
Confucius 502BC
|
|
|
|
|
Hi,
Iam using
Dim ConStr As String = "Data Source=1.1.1.1; initial Catalog=My_Databse; User Id=UserA; Password=xxxxxx"
dim con as new sqlconnection
con.connectionstring=ConStr
con.open()
But also I want to use the diffrent database called "Another_Database" with this same connection...
Is it possible?
|
|
|
|
|
You want to use two different database with the same connection?? AFAIK, that's not possible. But, I can see how I could very easily be wrong.
|
|
|
|
|
Fortunately for you Dave is wrong, if you remain on the same server.
Dim ConStr As String = "Data Source=1.1.1.1; initial Catalog=My_Databse; User Id=UserA; Password=xxxxxx"
dim con as new sqlconnection
con.connectionstring=ConStr
con.open()
'Do whatever you need to do in the first database here
'If there is a chance that some process will close the connection
'you also need to check for that first. The ChangeDatabase method
'requires an open connection
con.ChangeDatabase("Another_Database")
'Do whatever you need to do in the other database here
My advice is free, and you may get what you paid for.
|
|
|
|
|
Nice , This is the one I expected !!!
|
|
|
|
|
Enjoy.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi all...
I want to create a LAN application to handle one PC from another PC. One can see file system of another PC,share his desktop like NetMeeting etc.
I have created a program to handle file system of local machine but I want to Impliment it over LAN so that I can handle all PC connected to LAN by a single PC.
So suggest me how can I do this. If you have any example then please tell me.
Thanks.
Gagan
|
|
|
|
|
Define "handle"... Your question is just too vague to answer without that word defined.
Working with a remote file system is no different that working with a local one. You just have to use UNC paths instead of a drive letter. It would also help greatly if you understood how Windows networking works.
If your machines are all in the same ActiveDirectory domain, then you can just use your own admin-level account to gain access to the default admin shares on each machine. A typical UNC path would look like this:
\\workstationName\C$\folderPath\filename
|
|
|
|
|
How do you apply Visual Styles to the ProgressBar (without checking 'Enable XP Visual Styles' in the Application Properties), so that you get the Smooth Scrolling effect in Green as opposed to the Blue Chunks that is the default.
Regards, Graham
|
|
|
|
|
You'd have to make your own progress bar to do that without Visual Styles. The progressbar in the toolbox only takes it's cues from the Visual Style setting and the system.
|
|
|
|
|
Hi Dave,
Yes, applying Visual Styles is what I thought.
Imports System.Windows.Forms.VisualStyles.VisualStyleElement.ProgressBar
I was hoping that someone knew how to use that or could point me in the direction of where I would find out how to use that.
If I select 'Enable XP visual styles' in the Application Properties of a Project I will get the Smooth Scroll effect. However, that causes an undesirable effect in MonthCalendar that I want to avoid.
Therefore, I was wanting to Apply Visual Styles the ProgressBar Control only.
Regards, Graham
|
|
|
|
|
You can't use that on it's own. It's used by the control to figure out how to draw itself. Your problem is not the ProgressBar, but the MonthCalendar control. The solution is rather easy. Turn off VisualStyles for the MonthCalendar control and leave it on for everything else. You can find an example of how to do that here[^].
|
|
|
|
|
Many thanks Dave. That will work well for me.
I just have to translate that C# code into VB. That shouldn't be too hard.
Regards, Graham
|
|
|
|
|
i would create a user form, put in a frame (give it some fx like "2-fmSpecialEffectSunken), then put a label inside the frame with a background colour (fx = 1-fmSpecialEffectRaised), give it a small width.
Then within the main task you do a call to a sub that increases the width of the label.
(Assuming you know the rough size of the main task)
You can alter the colour/design of the bar and give it a label showing the %
Sub UpdateProg(pct)<br />
With ProgressIndicator this is the name of the userform described above.
.FrameProgress.Caption = Format(pct,"0%")<br />
.LabelProgress.Width = pct * (.FrameProgress.Width - 10)<br />
End Width<br />
DoEvents
This is a snippet from a Progress Indicator I use
------------------------------------
"When Belly Full, Chin Hit Chest"
Confucius 502BC
modified on Sunday, May 31, 2009 5:33 PM
|
|
|
|
|
Again, many thanks Dave.
I've tried that on my XP System and my Vista System and the end result is exactly what I was after.
The ProgressBar Scrolls as you would expect in Both Systems and the MonthCalendar maintains the appearance that I desired.
For anyone who may also need this fix in VB, here is the code.
Check the
'Enable XP visual styles' in the Application Tab of the Project Properties.
Imports System.Windows.Forms
Imports System.Runtime.InteropServices
' Declare this Function inside Form Class in which the Control is used.
Private Declare Unicode Function SetWindowTheme Lib "uxtheme.dll" _<br />
(ByVal hWnd As IntPtr, _<br />
ByVal pszSubAppName As String, _ <br />
ByVal pszSubIdList As String) As Integer<br />
Private m_intReturn As Integer
' Call the SetWindowTheme from within the Form Load Event.
' This with negate the Visual Styles for the Control in the Function's Parameter.
m_intReturn = SetWindowTheme( Control.Handle, "", "")
Regards, Graham
|
|
|
|
|
I have been developing a tapi application with the help I got from the web, even on this site by Devang and others. I succeeded in receiving and making call, but I can not just answer my incoming call, am using VS 2005 and Tapi 3.0 in VB#.
What I think is the problem is that my line registered is not be detected by the Answer call function. I will prefer if a sample code to make my answer call function to detect those line that I have registered.
Thank you.
Thayhor
|
|
|
|
|
I'm using vs2008 , I try to view multi line at crystalreport textobject as next
<br />
Dim s As String<br />
s = s & "this is first line " & Chr(13) + Chr(10)<br />
s = s & "this is second line "<br />
Dim rpt As New CrystalReport1<br />
<br />
Dim txt As TextObject<br />
<br />
txt = rpt.Section2.ReportObjects("Text1")<br />
txt.Text = s<br />
<br />
but it isn't working ,
it print the text at single line ,, despite of when I export the report to doc file, I fount that it's printed at two lines ..
what can I do
Thanks
jooooo
|
|
|
|
|
This is just off the top of my head, as I have no experience with crystal reports, but I have seen similar problems:
You can try this:
Dim rpt As New CrystalReport1
Dim txt As TextObject
txt = rpt.Section2.ReportObjects("Text1")
txt.Text = "this is first line " & Chr(13)
txt.Text &= "this is second line "
or this:
Dim rpt As New CrystalReport1
Dim txt As TextObject
txt = rpt.Section2.ReportObjects("Text1")
txt.Text = "this is first line "
txt.Text &= Chr(13) & "this is second line "
If neither of those work, I am afraid you're on your own again.
Good luck
My advice is free, and you may get what you paid for.
|
|
|
|
|
I have stored information about each menu in database. Now I want to create these menus dynamically, and want to open different forms when each menu is clicked. How can I implement it in windows application.
Thanks in advance.
|
|
|
|
|
1. Create an object of Menustrip and add it to the Controls collection of the form.
2. Add items to it and handle their Click event to open new forms.
|
|
|
|
|
Google is your friend.
The very first hit on a search for dynamic menus vb.net is Dynamic Menu Based on Database[^]. An article here on CodeProject.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi all,
as above how to do that man? I will also want to extract the information to be sent from the database. An example of what i am going to do is something like this:
Reference:
http://www.nus.edu.sg/comcen/sms/exams.htm
Please help me.Thanks buddies
|
|
|
|