|
I am not mailing you anything, if I did, you'd have my mail. The ANCHOR property is the one you're going to set for most controls. You can set as many sizes as you want, and those will scale. Just put two buttons on a form, and play with thier anchor properties, you'll get the idea.
I told you you needed to use the anchor property in my first post, so did the other person who replied.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi Everyone,
I want to do the following:
Press TAB To Jump From one Textbox To Another Textbox in a Form.
How to implement this? Can someone help me on this?
Regards
R.S.
|
|
|
|
|
this is already natural behavior as long as you have the tabindex of the 2nd textbox set to 1st textbox.tabindex+1?
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
Can You please elaborate a little bit more, as I have already created 8 textboxes and want to implement what You said?
|
|
|
|
|
When in form design, click the VIEW menu and select the menu item, TAB ORDER, you can then click the controls on the form to establish what the order will be when you press the tab key.
If you do not what a control to take part in TAB ORDER, set its tabcontrol property to false.
Alternate method for setting tab order, is to manually set each controls tab index property to a number. The first method is the best option.
|
|
|
|
|
Hi All,
Writting an ASP.NET app, I'm connecting to an sql database, connection is 100%, I just need the code to store a column value on a defined variable, I dnt want to diplay it jst the code to read the column value.
Dim connCatapult As New OleDb.OleDbConnection("Provider=SQLOLEDB;Data Source=CATAPULT;Initial Catalog=Catapult;Integrated Security=SSPI")
Dim daCatapult As New OleDb.OleDbDataAdapter("Select TestUserLoginDetails.UserName, TestUserLoginDetails.Password FROM TestUserLoginDetails", connCatapult)
Dim dsLoginData As New DataSet()
Dim strUsername As String = Login1.UserName
Dim strPassword As String = Login1.Password
daCatapult.Fill(dsLoginData, "TestUserLoginDetails")
'connCatapult.Open()
'**********This is all that i'm trying to do*****************
Dim strDbUserName As String
strDbUserName = ????????????????????
'********************************************************
please assist
|
|
|
|
|
Assuming that that query will only return one row, the following should work (but no guarantees):
strDbUserName = dsLoginData.Tables(0).Rows(0).Item("UserName")
EDIT: You may want to build in a check, because in case the query does not return any result you'll get an exception in your code.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Use OleDbCommand.ExecuteScalar() if you return a single value from the query.
|
|
|
|
|
Hi!
I have stumble on the keyword WithEvents, here is a code example:
Public Shared WithEvents theOpcServer As OPCAutomation.OPCServer = Nothing
Public Shared WtihEvents theOpcGroup As OPCAutomation.OPCGroup
What's the difference with those two declarations compared to:
Public Shared theOpcServer As OPCAutomation.OPCServer = Nothing
Public Shared theOpcGroup As OPCAutomation.OPCGroup
OPCAutomation is a reference from a DLL-file which I'm using in my application and OPCServer and OPCGroup are two classes from that namespace.
For my application is doesn't matter if I have 'WithEvents' or not. Can someone explain the 'WithEvents' keyword?
|
|
|
|
|
Selecting the word and than pressing F1 gives you the help.
Withevents let you select the events possible for that control at designtime
|
|
|
|
|
WithEvents has one powerful extra feature.
To use your example. Suppose you start with a variable such as
Public Shared theOpcServer As OPCAutomation.OPCServer = Nothing
We also assume you have and event handler somewhere eg.
Public Shared Sub OpcServerEventHandler(sender as Object, e as EventArgs)
With this code every time you assign an object to theOpcServer you need to attach and remove the Event Handlers. eg.
If theOpcServer IsNot Nothing Then
RemoveHandler theOpcServer.OpcServerEvent, AddressOf OpcServerEventHandler
End If
theOpcServer = New OPCAutomation.OPCServer()
AddHandler theOpcServer.OpcServerEvent, AddressOf OpcServerEventHandler
Alternatively use the WithEvents keyword and a Handles clause on the event handler sub.
Like this .Net does all the event handler maintenance for you without having to write armfuls of code.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
|
Hi All,
I have a Tabcontrol form with 4 tabs. I want to enable 1 tab ( which will be disabled when the Form loads) and will be enable using some authentication system, i.e. whenever user try to click on the disabled tab, it will prompt for entering some login/password which when matches, will enable the tab.
How to implement this?
|
|
|
|
|
AFAIK, you cannot enable/disable the tabe page itself. Although you can do that for the controls that recide in it.
You can handle the MouseClick event of the tab control and check the SelectedTab property. If that is the concerned tab page, show your login form. If the login succeeds, you can enable the controls in the tab page.
You can use delegates to handle the Ok (or whatever submit button you have in login form) button click in the form containing the tab control.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
Actually you can disable a tabpage. The Enabled property is hidden and unsupported, however if you type it in the code it does work.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
That's news for me. Thanks. I will try that tomorrow morning.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
Disabled controls (including Tab Pages) will not generate events
|
|
|
|
|
Good point.
A better solution would then to custom paint the tabs and make them look disabled based on some other property of the tabpage , maybe that tag property. If the Tag contains a boolean True then paint the tab to look disabled, then the events will still fire.
Personally I would rather assess the user security before entering the form and then disable or remove the appropriate tabs up front.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
When a control is disabled, it is a visual clue to the user that the functionality is not available. Don't expect your users to click on a disabled tab to get access to it. It doesn't make sense. Instead, provide a button somewhere on the main tab that provides access to the disabled tab.
Disabled tab will not generate events and you would end up wasting your time
|
|
|
|
|
I am looking for a way to createWindowEx and to get the handle of the control just created:
I have tried both these ways:
callfunc CreateWindowExA,
hwnd = CreateWindowExA(
but all i get back is a "0", telling me that all is well.
Pls, how can i do this.
Code in C+ or VB or HotBasic would be great!
Thanks...vmars
|
|
|
|
|
Hi,
vmars316 wrote: but all i get back is a "0", telling me that all is well.
On the contrary 0 or null is telling you that all is not well. What arguments did you supply to the function. A short code fragment showing the context of the call would be helpful.
Alan.
|
|
|
|
|
Straight from the documentation:
"If the function fails, the return value is NULL. To get extended error information, call GetLastError."
Luc Pattyn [Forum Guidelines] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
modified on Sunday, November 22, 2009 3:16 PM
|
|
|
|
|
Hello!
I have to produce a software license number from a PDA's device ID. Whenever a user submits this ID to web site, the new licence number must be produced according to submitted id and then whenever user uses the new license number in the software, the code should resolve the new id according to PDA's device id and confirms it.
For example:
The following is a PDA's device ID (7AAF5100226808010d19-c37ad75c0345) and the new license number should be likely this
(5FC6-88J9-1264-76K8)
How can I produce such algorithm. Is there a code sample? I need a road map to realize the concept.
Thank You.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
Use simple hashes based using secret company and product hashes as salts and then combine them all to generate a license hash.
|
|
|
|
|
How about Reversing the produced license key and finding the product of the secret company. Hascode only produces numeric numbers.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|