|
I'm sorry, it should have been the Message object, not the SmtpMail object.
Message.Dispose()
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I guess this one maybe a bit tough, but, does anyone know how to create a virtual com port? Or have any idea on how this can be done?
The aim is to create 2 ports with a virtual connection between them so that I can send data out one port for testing a program that recieves data from the other.
Thanks..
|
|
|
|
|
|
|
I want to access the "Data Link Property Layer" during runtime so that i could create a connection during deployment without editing the connection string value which is saved in a text file (which I usually do).
Anybody has an idea on how will i access Data Link Property and display it during run time?
|
|
|
|
|
thealca wrote: Data Link Property Layer
First of all, what are you calling a "Data Link Property Layer"?? You can't run any of your applications code in the middle of its installation. Any configuration options should be stored in the apps config file. Your installer should ask for different options, install the app, then modify the configuration file(s) of the app.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
"modify the configuration file(s) of the app."
I want this to be done in a GUI which is I thought It would be better if I can access the "Data Link Properties" GUI, from which I can select the Provider and the Data Source and save it to a file (might be .INI file or .XML file), so I don't have to edit the configuration file (app.config) file during deployment, which is also risky if you let somebody do the deployment because he might modify accidentally the other elements.
|
|
|
|
|
Are you talking about a dialog in the Visual Studio designer for setting the properties of a Connection object?
No, you can't get to it during the install. You have to provide some interface for this yourself.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Somebody know how to generate crystal report in vb.net programmatically!!!
I just want to know the codes on how to create a report from vb.net having a back-end ms access and using ado.net
|
|
|
|
|
i have also been trying to create crystal reports programatically like u. i s'pos what u mean is that u want to create a crystal report using the dataset u created and populated with data at runtime.
i think the only thing u can do is create the dataset by placing an apapter object from the toolbar. and populating the dataset using the fill method. then creating the report using that dataset.
if u want to do it programmatically i think u have to use temporary tables. wht i mean is u create a temp table in advance in your database then insert the data u want to display in the report at runtime. then create the report and display the data.(assume u know how to do it)
there is no other way to do it. i think. i have been trying it for some months now and i decided to finish the project i am doing the way i said. it works. so go ahead.
|
|
|
|
|
I have an existing vb.net application that runs on a local machine in our company. Currently, you must be at that machine in order to control it. I would like to add the ability to control some simple features from a browser on other machines on our intranet. However, I do NOT want to have to rewrite the application as an asp app or have it run on a web server. I also CANNOT break out the internal classes of this application into dlls.
Is it possible to *add* asp-type capabilities to this existing vb.net app? Any examples of a simple vb.net app doing so are appreciated.
|
|
|
|
|
smarr wrote: I would like to add the ability to control some simple features from a browser on other machines on our intranet. However, I do NOT want to have to rewrite the application as an asp app or have it run on a web server. I also CANNOT break out the internal classes of this application into dlls.
So are you saying that you want to create a web app that doesn't run on a web server ? Your other alternative is to write a web server. That is a/ a lot of work and b/ meaning you'll still be running on a web server.
smarr wrote: Is it possible to *add* asp-type capabilities to this existing vb.net app?
The way to do this is to reuse your business logic, and write an ASP.NET presentation layer. You'll need to 'break' internal classes into a new project, if you can't put them in a dll, you'll need to just copy them. The resultant app will, by definition, need to be on a web server.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I believe I understand what you are saying--that adding asp capabilities to an existing vb.net app is not trivial (or possible?) and the "guts" of the app will need to be moved into an asp.net application. Correct?
I can live with a web server, and could probably incorporate one into the machine which is running this app. However, the application is far too complex to be easily ported to an asp application (or any other type, for that matter). The core logic is deeply ingrained into the application and could not be moved (easily) into a dll.
|
|
|
|
|
smarr wrote: that adding asp capabilities to an existing vb.net app is not trivial (or possible?) and the "guts" of the app will need to be moved into an asp.net application. Correct?
Mostly. It is in fact possible to add a web app to your existing project, but you'd have two vbproj files, and I think it's too messy to do it that way
smarr wrote: The core logic is deeply ingrained into the application and could not be moved (easily) into a dll.
I guess that makes this a lesson in application design Any half decent app should be written so that the business logic is easily divorced from the presentation layer. Too late for that now. If you can't seperate the two, then I guess your best bet is to build a web app and then add all the code you need from your application, so that you can access the business logic from the web pages.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
If I have a dialog that has been opened from my main form using code such as this:
Dim frm As New frmService
frm.ShowDialog(Me)
how do I prevent the whole application being minimised if the dialog is minimised?
-- modified at 16:50 Sunday 22nd January, 2006
I'm using VB.NET in Visual Studio 2003.
|
|
|
|
|
Set ShowDialogInTaskbar to true, which is the default.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I tried setting this to true prior to my original post but I got the same result.
Is there anything else which would cause this?
|
|
|
|
|
Maybe you can't set the owner on a dialog that you want to behave independently.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have tried both setting the owner and leaving the dialog ownerless.
I have also tried setting ShowDialogInTaskbar to TRUE and FALSE.
No matter what combination I try the whole application becomes minimised when the dialog is minimised.
Can anyone provide a small sample app that lets the user minimise a dialog without the whole application being minimised?
|
|
|
|
|
As it's a modeless dialog, perhaps you just want to have a button that hides it on the dialog ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I finally got it working by using the following code:
Private Sub CustomForm_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.LocationChanged<br />
<br />
If Me.WindowState = FormWindowState.Minimized Then<br />
Me.Owner.WindowState = FormWindowState.Normal<br />
End If<br />
End Sub
What caused some problems was that when the application was launched in debug mode from Visual Studio, Visual Studio itself seemed to be the owning window rather than the parent form.
The good news is that it all works in when run as the release build exe file.
|
|
|
|
|
Somebody know how to connect an object pointer of an interface. I got errors at IAMTVTuner get and put.
<code>
Public Sub TvTuner()
Dim hr As Long
Dim pIAMTVTuner As Long
Dim oIAMTVTuner As IAMTVTuner
Dim riidIAMTVTuner As VBGUID
'{211A8766-03AC-11d1-8D13-00AA00BD8339} = IAMTVTuner
riidIAMTVTuner = StrToGUID("{211A8766-03AC-11d1-8D13-00AA00BD8339}")
Dim rclsidWDM As VBGUID
'{266EEE40-6C63-11cf-8A03-00AA006ECB65} = WDM TV Tuner
rclsidWDM = StrToGUID("{266EEE40-6C63-11cf-8A03-00AA006ECB65}")
hr = CoCreateInstance(rclsidWDM, 0, CLSCTX_INPROC_SERVER, riidIAMTVTuner, pIAMTVTuner)
If hr = S_OK Then
Set oIAMTVTuner = GetObject(pIAMTVTuner)
Dim x1 As Long
oIAMTVTuner.get_CountryCode x1 'x1 => -1
oIAMTVTuner.put_Channel 38&, 38&, 38& 'Run-time error '5': Invalid procedure call or argument
End If
End Sub
Public Function GetObject(ByVal pObject As Long) As IAMTVTuner
Dim o As Object
PutMem4 o, pObject
Set GetObject = o
PutMem4 o, 0
Set o = Nothing
End Function
</code>
This is the TypeLib odl-file
<code>
[
uuid(1A4C3A6A-50AE-11D1-BB71-00C04FAD8B08),
version(1.1)
]
library QuartzPropertyTypeLib
{
importlib("StdOle2.tlb");
typedef enum tagTunerInputType
{
TunerInputCable,
TunerInputAntenna
} TunerInputType;
typedef enum tagAMTunerModeType
{
AMTUNER_MODE_DEFAULT = 0x0000, // default tuner mode
AMTUNER_MODE_TV = 0x0001, // tv
AMTUNER_MODE_FM_RADIO = 0x0002, // fm radio
AMTUNER_MODE_AM_RADIO = 0x0004, // am radio
AMTUNER_MODE_DSS = 0x0008, // dss
} AMTunerModeType;
typedef enum tagAMTunerEventType{
AMTUNER_EVENT_CHANGED = 0x0001, // status changed
} AMTunerEventType;
interface IAMTunerNotification;
[
object,
local,
uuid(211A8766-03AC-11d1-8D13-00AA00BD8339),
pointer_default(unique)
]
interface IAMTVTuner : IAMTuner
{
// Gets the supported analog video standards (NTSC/M, PAL/B, SECAM/K1, ...
HRESULT get_AvailableTVFormats(
[out] long *lAnalogVideoStandard
);
// Gets the current analog video standard (NTSC/M, PAL/B, SECAM/K1, ...)
HRESULT get_TVFormat(
[out] long * plAnalogVideoStandard
);
// Scans for a signal on a given channel
// NOTE: this is equivalent to put_Channel(), SignalStrength()
HRESULT AutoTune(
[in] long lChannel,
[out] long * plFoundSignal
);
// Saves the fine tuning information for all channels")]
HRESULT StoreAutoTune();
// The number of TV sources plugged into the tuner
HRESULT get_NumInputConnections(
[out] long * plNumInputConnections
);
// Sets or gets the tuner input type (Cable or Antenna)
HRESULT put_InputType(
[in] long lIndex,
[in] TunerInputType InputType
);
HRESULT get_InputType(
[in] long lIndex,
[out] TunerInputType * pInputType
);
// Sets or gets the tuner input
HRESULT put_ConnectInput(
[in] long lIndex
);
HRESULT get_ConnectInput(
[out] long *plIndex
);
// Gets the video and audio carrier frequencies
HRESULT get_VideoFrequency(
[out] long *lFreq
);
HRESULT get_AudioFrequency(
[out] long *lFreq
);
};
[
object,
local,
uuid(211A8761-03AC-11d1-8D13-00AA00BD8339),
pointer_default(unique)
]
interface IAMTuner : IUnknown
{
// Sets and gets the Channel
HRESULT put_Channel(
[in] long lChannel,
[in] long lVideoSubChannel,
[in] long lAudioSubChannel
);
HRESULT get_Channel(
[out] long *plChannel,
[out] long *plVideoSubChannel,
[out] long *plAudioSubChannel
);
// Gets the minimum and maximum channel available
HRESULT ChannelMinMax(
[out] long *lChannelMin,
[out] long *lChannelMax
);
// CountryCode is the same as the international
// long distance telephone dialing prefix
HRESULT put_CountryCode(
[in] long lCountryCode
);
HRESULT get_CountryCode(
[out] long *plCountryCode
);
HRESULT put_TuningSpace(
[in] long lTuningSpace
);
HRESULT get_TuningSpace(
[out] long *plTuningSpace
);
HRESULT Logon(
[in] HANDLE hCurrentUser
);
HRESULT Logout();
// Signal status for current channel
// signal strength == TUNER_NOSIGNAL, or strength value
HRESULT SignalPresent(
[out] long * plSignalStrength // AMTunerSignalStrength
);
// allow multifunction tuner to be switch between modes
HRESULT put_Mode(
[in] AMTunerModeType lMode // AMTunerModeType
);
HRESULT get_Mode(
[out] AMTunerModeType *plMode // AMTunerModeType
);
// retrieve a bitmask of the possible modes
HRESULT GetAvailableModes(
[out] long *plModes // AMTunerModeType
);
// allow IAMTuner clients to receive event notification
HRESULT RegisterNotificationCallBack(
[in] IAMTunerNotification *pNotify,
[in] long lEvents // bitmask from AMTunerEventType enumeration
);
HRESULT UnRegisterNotificationCallBack(
IAMTunerNotification *pNotify
);
};
[
object,
local,
uuid(211A8760-03AC-11d1-8D13-00AA00BD8339),
pointer_default(unique)
]
interface IAMTunerNotification : IUnknown
{
HRESULT OnEvent([in] AMTunerEventType Event);
};
};
</code>
|
|
|
|
|
how can i set different fonts to different
columns in a data grid ?
i need to show regional language data and english data in one datagrid
|
|
|
|
|
how to show autonumbers in a text control fromm a table in the database
|
|
|
|
|
What do you mean? What is the problem, really? The autonumber property only affects how the value of the field is created, not how you read the field.
---
b { font-weight: normal; }
|
|
|
|