|
In the clear light of morning that makes sense. It didn't late last night. Amazing what a difference a few hours sleep can make. Thanks!
"If it's Snowbird season, why can't we shoot them?" - Overheard in a bar in Bullhead City
|
|
|
|
|
In visual c++, you override the << operator, IE if myInstance was of a type of instance that I created, I would override << to be able to do fileio << myInstance. How do I do this for Visual Basic 6.0 where I can do Write #1, myInstance and/or Input #1, myInstance?
Thank you,
-----------------
http://www.zachcalvert.com
|
|
|
|
|
Not support in VB6. There is no operator overloading what-so-ever. This isn't even a feature in Visual Basic.NET 2002 or 2003. This won't happen until the 2005 release. Also, the operator your overloading is a stream operator. There is no such operator in the 2005 release, AFAIK.
You class will have to supply it's own support for converting itself to a string and returning that string. Then your parent code can use that to output to whatever stream you see fit. But, there is no operator that does this for you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
Does anyone know a way to track a cdrom drives activity ie when a disc is inserted and taken out
|
|
|
|
|
I am attempting to use 3 different MMControls in VB 6.0 - NOT .NET. These controls cause/throw no errors when I am using them, but only one is playing a sound. This is the code I use to initialize the 3 controls (all get the same initialization)
UpMidi.Notify = False
UpMidi.Wait = True
UpMidi.Shareable = False
UpMidi.DeviceType = "Sequencer"
UpMidi.FileName = "UpBeat.mid"
UpMidi.Command = "Open"
UpMidi.Command = "Play"
I have tried setting shareable to true (which then no sound plays), setting notify to true, wait to false, etc. Documentation on this has been little to none and I have no idea what to do from here. All 3 files must be played at the same time. It is testing a music student their capabilities to keep track with the beat, so it must provide them feedback.
Any and all help would be greatly appreciated.
Thank you,
Red Sunday
-----------------
http://www.zachcalvert.com
|
|
|
|
|
Hello,
I have defined the following class with the following methode:
Public Class DrwButtons
Private MFDFont As New Font("Arial Narrow", 11)
Const RectWidth As Integer = 130
Const RectHeight As Integer = 28
'Aufzählung der möglichen Buttonstyles
Enum ButtonStyle As Integer
BtnUnactive
BtnActive
BtnIsClickable
BtnMouseOver
End Enum
'Die Button Zeichenfunktion
Public Sub DrwButton(ByVal x As Integer, ByVal y As Integer, _
ByVal TextTop As String, ByVal TextBottom As String, _
ByVal BtnStyle As ButtonStyle, ByVal g As Graphics)
'///CODE...
End Sub
End Class
and now I'm trying to call the methode on the event MouseDown. The Problem is that I cannot call DrwButton on the MouseDown event because the MouseDown event is defined as follows:
Private Sub B772_MFD_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown
'///CODE...
End Sub
As you see the "e" is defined as System.Windows.Forms.MouseEventArgs and not as System.Windows.Forms.PaintEventArgs as it should be. I have no idea how I can call the DrwButton Methode from the MouseDown event. Please HELP!
Thanks in advance
Fred
|
|
|
|
|
Why can't you call any method you like once you catch the mousedown method ?
What you should probably be doing ( from what I can tell of this code ) is call Invalidate on your window class in your mousedown method, and handle the painting where it should be handled, in the paint method. Change whatever variables you want to in your mouse event handlers, then Invalidate will cause the paint method to be raised.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
We have developed a utility which impersonates the local administrator in order to carry out tasks on our bolted down workstations.
This works extremely well but the final part we have to include is the ability for the local administrator to access the network resources of the currently logged in user.
Could anyone point me to sample code that illustrates a method to achieve this?
Thank you
John Gamson
|
|
|
|
|
I have developed an application, it stores data on MSSQL server after encrypting the same using cryprencrypt function of advapi. The data is restored on XP system where default language is set to english but when the language settings are changed to Thai data is not restored in proper format (MSSQL in on win2000)
Any Help??
|
|
|
|
|
This is pretty simple, I hope. All I want to do is have a button, click it once and put the number 5, click it again and it adds another 5, ans so on. How would you do this?
TIA
Rudy
|
|
|
|
|
I don't know if I have understood your question correctly or not.
but I guess what you need is the Static variable. you can define a varialble in the cliuck event of the button like this:
Static MyVar As Integer<br />
Myvar += 5
then every time you press the button, the number is raised by 5 (first time 5, second time 10, etc.)
one other way is defining your variable Private in the class of form1. in this case, the variable can be accessed by other functions in the form.
hope it'd help.
|
|
|
|
|
I'll try that out. Thanks for the info!
|
|
|
|
|
PERFECT, it worked. Thank you!!!!
|
|
|
|
|
The FolderBrowserDialog opens at the root level and not the selected path. Also, the New Folder Button is missing. This is VB.NET 2003 Framework version 1.1 code developed on XP. Normal behavior occurs on the XP machine. When the application runs on Windows 98 with .NET Framework 1.1 installed, the above mentioned problems exist.
I have found the documented bug regarding Windows 2000 and the ShowNewFolderButton property. Apparently, setting this property to false has no effect. I have not seen references about Windows 98.
What's up? Can anyone make the FolderBrowserDialog.SelectedPath work with VB.NET on anything other than XP?
|
|
|
|
|
I'm using Asp w/ Vb (Studio 2003) and I am working w/ a Datareader; however, it will not move past the first record.... Here's my code; any help is appreciated..
Dim User
User = Me.txtUsername.Text
SqlConn.Open()
DR = SqlComm.ExecuteReader()
While DR.Read()
If User = DR("DTLoginID") Then
Me.PChange.Visible = True
Exit Sub
ElseIf User <> DR("DTLoginID") Then
MsgBox.alert("User Does not exist")
' Me.Visible = False
Exit Sub
Else
Response.Redirect("Login.aspx")
MsgBox.alert("wrong")
Exit Sub
End If
End While
DR.Close()
SqlConn.Close()
|
|
|
|
|
I'm getting some unpredictable results when I divide two Doubles. Here is an example.
If
Dim a() As Double = New Double() {30.0, 3.0, 0.3, 0.03, 0.003, 0.0003}
Dim b() As Double = New Double() {20.0, 2.0, 0.2, 0.02, 0.002, 0.0002}
then according to .NET
a(0) / b(0) = 1.5
a(1) / b(1) = 1.5
a(2) / b(2) = 1.4999999999999998
a(3) / b(3) = 1.5
a(4) / b(4) = 1.5
a(5) / b(5) = 1.4999999999999998
Not a big difference in magnitude but my code also involves rounding the results which really throws things off.
Any help with an explanation and/or solution is greatly appreciated.
|
|
|
|
|
This is because the internal representation of floating point numbers is not exact. There are many articles all over the 'Net about IEEE storage format and why this happens.
A workaround would be to round the results off to the number of decimal places you want using Math.Round() , or use Decimal types instead of Double.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How do I trap the each key pressed in the particular cell only of msflexgrid
in vb6
|
|
|
|
|
Hi Everyone,
I am beginner to dotnet. I just started developing web pages in VB.Net. I am planning to use
TabStrip control as a main menu page. I have 3 tabs like this,
HOME DATAENTRY REPORTS
I would like to populate few reports(Report1,Report2 etc) under REPORTS tab. when a user click or place mouse on Reports, sub menu options should display.
I need your great help. I am trying to find info for this. even i am not sure wheather i can do in Tabstrip control.
I appreciate your help.
Thanks
Bob
|
|
|
|
|
You question would be better handled in the ASP.NET Forum. I've never used the TabStrip control, but I don't believe it'll do what you want. I think your going to have to implement dropdown menus in JavaScript yourself.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank your for your response. Let me post this in ASP.NET Forum to see if anyone had similar req before.
Thanks
Bob
|
|
|
|
|
I've performed the scanner interfacing through VB.NET using WIA. The scanning is performed using the Windows own Scanner Wizard dialogbox. This dialog box obviously has its own options, including the preview of the scanned image.
My question is that, is there anyway to edit or manipulate this dialogbox through the code, so that I can disable certain options?
OR
Is there anyway that i can directly scan the image with any default options of my choice without any wizard, and display the scanned image directly in my form?
thanx in advance
☺«««DTA»»»☺
|
|
|
|
|
azam316 wrote:
My question is that, is there anyway to edit or manipulate this dialogbox through the code, so that I can disable certain options
No, there isn't.
azam316 wrote:
Is there anyway that i can directly scan the image with any default options of my choice without any wizard, and display the scanned image directly in my form?
Search the articles! A quick search turned up .NET TWAIN image scanner
[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Maybe I am just not up to speed w/ .NET, but when I create my Performace Counters and Category, they load just fine, I can see them in the WMI performance Monitor, however they do not display the activity that is incrementing them. WMI reports that the class has no methods. I can not seem to find any information on what those methods would be? Can anyone point me in the right direction?
|
|
|
|
|
Im trying to implement an encryption technique in my collage and i have to get the ascii number of the character to aplly the algorithem to that character ..
like in c++ for example ..
the ascii code of the a=65 and b=66 and so on ..
if any one have an idea about how to get this ascii value in vb.net .. plx reply me ..
thanx
لا اله الا الله محمد رسول الله
|
|
|
|