|
hello christian, thank you for your reply. Point well taken, but does it require more maintenance in the future is it faster, etc? thank you
eatwork
|
|
|
|
|
In fact, it's faster and easier to maintain.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks, are there any other pros / cons that you can think of for binding a database? And do you know of any examples/solutions out there that I could look at? My project has 120 tables and the system requires a user login, the user to select their database connection location on the server and I am not sure I want to continue the project in the unbound format. Thanks
eatwork
|
|
|
|
|
To be honest, I'd assume being bound to the database would be the default, and most examples on the web would assume this approach
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I want fill a listbox with sqlTable Records from Other Page but i don`t know ...:
Best Regards
Hussein Madani Ghomi
+98-912-5577-832
|
|
|
|
|
Hi,
Write a function for filling the list box on the page where the list box is there. Call this function from the other page where you have the data table passing it the data table.
Hope i am clear enough !
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|
|
Hi Dear Anant
I know i have to create a function , but my question had a little wrong.
But my currect question is :
-How to filling a listbox from other page at a web application pages(ASP.NET 2.0)?
however thank you so much...
Best Regards
Hussein Madani Ghomi
+98-912-5577-832
|
|
|
|
|
Hi,
I would like to get a help in this;
Iam using a masked textbox for a time entry.
it is masked as Time(European/Military)(00:00).and in the windowsform it is shown as
--:--
Now if the user enter the inputs, how will i validate that the entry to be in the format of 00:00.
Sometimes users enter the time as --:-1
how will i validate this type false entry in a maskedtextbox.
please help .
chepps
|
|
|
|
|
I have a masked textbox for dates (mm/dd/yyyy). One validation that I did do was to see if (after trimming) the text was to see if it was below the 10 characters it should be. Maybe you can do that here. If the length is 5, then you can parse the data out (hour and minute) to make sure each value is within the valid hour (00-23) and minute (00-59) [unless there is a function to validate time].
I'm curious to see other suggestions, though.
|
|
|
|
|
iam not able to take that 2 parts seperately at the same time from the masked textbox.AT a time i can take only hours or minutes.not both.
Could u please tell me the condition to check whether the hours part falls in 00 to 23.because to put in a integer loop i will not get the values as 00,01...till 09.
please help.
rgds,
CHepps
|
|
|
|
|
In the validation method of the masked textbox (mt for now), I would do something like...
hr=cint(mid(mt.text,1,2))
min=cint(mid(mt.text,3,2))
if hr<0 or hr>23
' Error!!!
end if
if min<0 or min>59
' Error!!!
end if
Hope this helps.
|
|
|
|
|
Hi sa_runner,
The code that u gave works for me.Thank you.
But in the data entry , if i leave the hour part(then this will be space) or a minute part then this gives me a error saying space cannot be converted to integer.ACtually i should handle this type of entry (giving blank on either part) also and has to pop up a msg that "not a valid time entry'.
Is there a way?
Thanks and regards,
Chepps
|
|
|
|
|
I have a problem to show data in an OWC9 ChartSpace. I can bind the OWC spreadsheet (no error returned). However I get an empty chart despite the fact that the range on the spreadsheet contains numeric data.
This is the code to bind the chart and the spreadsheet (ctlSpreadsheet refers to the spreadsheet on the form, ctlChart referes to the chart on the form):
Me.ctlGraph.Clear()
Me.ctlGraph.Charts.Add()
Me.ctlGraph.DataSourceType = _ OWC.ChartDataSourceTypeEnum.chDataSourceTypeSpreadsheet
Me.ctlGraph.DataSource = CType(Me.ctlSpreadSheet, AxHost).GetOcx()
Me.ctlGraph.Charts(0).SeriesCollection.Add()
Me.ctlGraph.Charts(0).SeriesCollection(0).SetData _(OWC.ChartDimensionsEnum.chDimValues, 0, "D3:E3")
|
|
|
|
|
Dave,
Thank you so much for your good suggestion. These days, I did a lot of research on .net call com component.
Following their instruction, I ‘m starting to work on vb.net part to call the com component. Like the one of them (http://www.dotnetcoders.com/web/Articles/ShowArticle.aspx?article=55).
The following steps is what I did.
1. I ‘m using VS.net command prompt. Go to the directory where .dll file lives
type: TLBIMP comAuth.dll /out: comAuthMetadata.dll, then I can find comAuthMetadata.dll in the same directory.
2. Use ildasm comAuthMetadata.dll command on VS.net command prompt, I can view the com specific information just like the one mentioned in this article. But I can’t find the method I want to call from vb.net.
Did I do something wrong? Or the problem comes from MFC com? Don’t I have the privilege to access method in com?
Thank you very much in advance for your any suggestion
Jane
|
|
|
|
|
Is the method 'Public' in the com?
Steve
|
|
|
|
|
Steve,
Thank you very much for your immediate reply.
Actually, my colleague who is responsible for com found same problem as me. He try to modify it.
Jane
|
|
|
|
|
How to play WAV file from resource ???
Mihei89
|
|
|
|
|
Hi,
you can try the code below
using System;
using System.Runtime.InteropServices;
using System.Resources;
using System.IO;
namespace Win32
{
public class Winmm
{
public const UInt32 SND_ASYNC = 1;
public const UInt32 SND_MEMORY = 4;
// these 2 overloads we dont need ...
// [DllImport("Winmm.dll")]
// public static extern bool PlaySound(IntPtr rsc, IntPtr hMod, UInt32 dwFlags);
// [DllImport("Winmm.dll")]
// public static extern bool PlaySound(string Sound, IntPtr hMod, UInt32 dwFlags);
// this is the overload we want to play embedded resource...
[DllImport("Winmm.dll")]
public static extern bool PlaySound(byte[] data, IntPtr hMod, UInt32 dwFlags);
public Winmm()
{
}
public static void PlayWavResource(string wav)
{
// get the namespace
string strNameSpace=
System.Reflection.Assembly.GetExecutingAssembly().GetName().Name.ToString();
// get the resource into a stream
Stream str =
System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream( strNameSpace +"."+ wav );
if ( str == null )
return;
// bring stream into a byte array
byte[] bStr = new Byte[str.Length];
str.Read(bStr, 0, (int)str.Length);
// play the resource
PlaySound(bStr, IntPtr.Zero, SND_ASYNC | SND_MEMORY);
}
}
}
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::;
To use the class, you can make the call as follows:
private void button2_Click(object sender, System.EventArgs e)
{
Win32.Winmm.PlayWavResource("chimes.wav");
}
|
|
|
|
|
How to use flexgrid in VisualBasic.net
can u help me
thanks in advance
|
|
|
|
|
Why would you want to ? That's what the datagrid is for.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks a lot.
is datagrid is same as Flexgrid in VB
|
|
|
|
|
Hi,
may i know how to disable alt+tab and windows key for my application?
ghost
|
|
|
|
|
If that's possible at all, it requires a system wide keyboard hook. There are articles on CP on how to do this, but I'm not sure if it will work. If not, then it's not possible.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Yes It is possible. You will definitely need a System Wide Hook.
Which version of VB are you using ¿
In VB 6, you will need to use the SystemParametersInfo API. You can implement it like this :
Private Declare Function SystemParametersInfo _
Lib "user32" Alias "SystemParametersInfoA" _
(ByVal uAction As Long, ByVal uParam As Long, _
ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long 'API Function to disable keys
Private Sub DisableCtrlAltDel(bDisabled As Boolean)
' Disables Control Alt Delete Breaking
'as well as Ctrl-Escape
Dim X As Long
X = SystemParametersInfo(97, bDisabled, CStr(1), 0)
End Sub
Then the call to the Above function :
Private Sub Form_Load()
Call DisableCtrlAltDel(True) 'disable the system keys
End Sub
'Remember to Enable the system keys again, when the program exits, otherwise it will remain blocked. To re enable them, Just supply False to the DisableCtrlAltDel function.
With VB.NET it is a bit more difficult. Luckily there is a component called mclhotkey, which will give you the functionality of a System Wide Hook. You can find that component here :
http://www.codeproject.com/useritems/mclhotkey.asp?print=true[^]
Hope that helps!
H T G
|
|
|
|
|
Hi,
Sorry forget to tell you what version i am using. I am using vb.net 2005 to develop a windows form.
|
|
|
|