|
Then find out how to create a VPN from code
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
It's quite obvious that you don't know how a cable modem works.
You can't use it to "call" another cable modem, or a server for that matter. It will only connect to the cable company service, and supply you with a connection to the Internet. You don't get to tell it where to connect or how. It is mearly a part of the cabling medium that your IP traffic travels over, which your application shouldn't care about at all.
The only way you're going to get a secure connection to your server is to have a VPN tunnel setup between your two networks. How you code builds this tunnel is entirely up to the VPN solution your using. There is no support for this in the .NET Framework.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hello
i have a server where i make a thread to proccess some data. i a time a send some data to the client and i need a response from him. i received the respons from client in server in event OnReceived, but i don't know how to pass this data to the thread. in fact in the thread i want to make a function byte[] SendAndReceived(Byte[]).
in my opinion in the thread i need a new event ThreadOnReceived() where to pass the event(data) received in server OnReceived(), but i don't know if this is a good ideea, and i don't know how to implement it.
thanks,
Mihai
|
|
|
|
|
Your assumption is correct.
You should either expose an event, or pass a delegate.
delegate void DataReceivedHandler(byte[] data);
void Loop()
{
while(true)
{
if (DataReveived != null)
{
DataReceived(data);
}
}
}
void OnDataReceived(byte[] data)
{
}
void StartLoop()
{
DataReceived = new DataReceivedHandler(OnDataReceived);
Thread.Start(new ThreadStart(Loop));
}
|
|
|
|
|
hai,,,
is there any particular function by which i can directly use unicode in API..
for eg:
StaticObjects.[lIndex] = "बीच की रेखा";
"बीच की रेखा" is language hindi.. but when i run the code, instead of hindi it shows "??????" in those places... how can i solve this...? while debugging it for the first time its showing warning-----
"some unicode charecters in ths file could not be saved in the current code page. Do you want to resave this file as Unicode in order to maintain your data?"
how to solve this
|
|
|
|
|
The .NET Framework is using Unicode.
You need to check:
1) Is your source file actually saved as Unicode (if you can open the file again and the text is fine, it is saved in Unicode). If not, manually save the file with Unicode - Advanced Save Options on the File menu in VS2005)
2) Where are you outputting the text. The Console will NOT run Unicode by default (you can try to mess with the command "chcp").
|
|
|
|
|
hai..
yes the files is saving as unicode only.... i am displaying this in an ordinary form, which is a child form to a main form. i tried in a single form on button click i am able to disply the value. but on formload i am not able to display it.? can u help me out in this... thanks in advance...
Regards
|
|
|
|
|
If you save the source as UTF-8, try UTF-16 instead. No, it should not matter, but you should not have the problem in the first place.
Besides that I can't really offer any help as I do not even know HOW you are trying to display the text (caption of a dialog, messagebox, TextOut in draw command, label control, etc.
|
|
|
|
|
Hi,
I created scrollbars for my datagrid in asp.net successfully but I was not able to create a fixed column head. Any helpful hints?
thanks
|
|
|
|
|
You can do it via styles,
.DataGridFixedHeader
{
font-family:Arial;
font-size:x-small;
font-weight:bold;
POSITION: relative; TOP: expression(this.offsetParent.scrollTop - 2); BACKGROUND-COLOR: lightgrey
}
use this style for your datagrid header.
|
|
|
|
|
It is not doing it I already tried that.
|
|
|
|
|
So how did you create scroll bars for your datagrid? Are you using a div tag for creating them? If you have tried using css, how did you use the css class for your header?
|
|
|
|
|
I have used the div tags yes. the style tags and what is with in them is in the head.I do not have a css class, but I put the cssClass name as DataGridHeader since it is within the style tags. My code looks like this:
****beg div (assume that 'div' is written before style = "left")
<style="left: 18px;="" overflow:="" auto;="" width:="" 66%;="" position:="" absolute;="" top:="" 248px;="" height:="" 100px"="">
<asp:datagrid id="DataGrid1" style="Z-INDEX: 164; LEFT: 18px; POSITION: absolute; TOP: 248px"
="" runat="server" bordercolor="Black" width="776px" height="56px">
<alternatingitemstyle font-size="Smaller" font-bold="True" backcolor="ControlDarkDark">
<itemstyle font-size="Smaller" font-bold="True" forecolor="White" backcolor="Black">
<headerstyle font-size="Smaller" font-bold="True" horizontalalign="Center" forecolor="Black"
="" backcolor="White" cssclass="DataGridFixedHeader">
** end div
.DataGridFixedHeader { POSITION: relative; ; TOP: expression(this.offsetParent.scrollTop - 2); BACKGROUND-COLOR: white }
-- modified at 15:23 Tuesday 18th July, 2006
|
|
|
|
|
Hi Naji ,
I have used the style in an external stylesheet and the class is as follows:
.DataGridFixedHeader
{
font-family:Arial;
font-size:x-small;
font-weight:bold;
POSITION: relative; TOP: expression(this.offsetParent.scrollTop - 2); BACKGROUND-COLOR: lightgrey
}
Linking the style:
The aspx code is:
<asp:datagrid id="dgForDelete" runat="server" width="100%" bordercolor="DarkGray" borderstyle="Solid" allowsorting="True" cellpadding="3" autogeneratecolumns="False">
<headerstyle font-size="Smaller" font-bold="True" wrap="False" horizontalalign="Left" cssclass="DataGridFixedHeader">
|
|
|
|
|
Thanks man. I moved the datagrid to the top of the scroll bar boudary and I put the style in the head. I also used the CssClass = "DataGridFixedHeader".
It works now.
|
|
|
|
|
Glad to know that
|
|
|
|
|
i have a datagridview and a save button.
after editing the last cell of the grid and click the save button.
the value of the last cell of the datagridview is null.
i already set its property to EditOnKeystroke still it returns null to the last cell of the datagrid.
thanks
|
|
|
|
|
Hi guyz...
I've got a problem calling MDIchild by another MDIchild using
this C# code:
frmFloatDialog floatDia = new frmFloatDialog();
floatDia.ShowDialog();
I have a sample code but the code was written on vb. It uses private shared
and private property but shared and property won't work on c#.
Please advice...
thank you so much...
-- modified at 22:35 Sunday 16th July, 2006
|
|
|
|
|
paulcortez wrote: shared and property won't work on c#
It will. The C# equivalent of VB's "shared" is static. You can apply both static and private to a property, so what's the problem?
Now, if you're saying the VB property is private, yes, you can't access private members of other classes; that's a principle of keep-your-own-crap-private OO design.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Goof around music jam with my brothers (with video)
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Ahhh.. so to convert this code to c#
vb code:
Private Shared mFormDefInstance As frmBillingAll
Private Shared mInitializingDefInstance As Boolean
Public Shared Property defInstance() As frmBillingAll
Get
If mFormDefInstance Is Nothing OrElse mFormDefInstance.IsDisposed Then
mInitializingDefInstance = True
mFormDefInstance = New frmBillingAll
mInitializingDefInstance = False
End If
defInstance = mFormDefInstance
End Get
Set(ByVal Value As frmBillingAll)
mFormDefInstance = Value
End Set
End Property
I'll be using:
Private static frmFloatDialog floatDialog = new frmFloatDialog();
Private static bool mInitializingDefInstance;
Public static Property defInstance() As frmBillingAll --> I dont know how to convert this thing...
Get
If mFormDefInstance Is Nothing OrElse mFormDefInstance.IsDisposed Then
mInitializingDefInstance = True
mFormDefInstance = New frmBillingAll
mInitializingDefInstance = False
End If
defInstance = mFormDefInstance
End Get
Set(ByVal Value As frmBillingAll)
mFormDefInstance = Value
End Set
End Property
Please help me men... I don't know how to convert the rest of it...
|
|
|
|
|
paulcortez wrote: Public static Property defInstance() As frmBillingAll --> I dont know how to convert this thing...
Get
If mFormDefInstance Is Nothing OrElse mFormDefInstance.IsDisposed Then
mInitializingDefInstance = True
mFormDefInstance = New frmBillingAll
mInitializingDefInstance = False
End If
defInstance = mFormDefInstance
End Get
Set(ByVal Value As frmBillingAll)
mFormDefInstance = Value
End Set
End Property
Please help me men... I don't know how to convert the rest of it...
First, there are several free tools available that convert VB snippets into equivalent C#. Lutz Reflector is one such tool.
I will do this one conversion for you; after that, it's best to learn how to fish yourself and use the freely available tools to do this.
public static frmBillingAll DefInstance
{
get
{
if(mFormDefInstance == null || mFormDefInstance.IsDisposed)
{
mInitializingDefInstance = true;
mFormDefInstance = new frmBillingAll();
mInitializingDefInstance = false;
}
defInstance = mFormDefInstance;
}
set
{
mFormDefInstance = value;
}
}
p.s. when posting code snippets in this forum, be sure to surround your code with <pre> tags.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Messianic Instrumentals (with audio)
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Hello all. I know that it's possible to show URLs in a RichTextBox, however, I cannot find a way to hide the href tag. For example, <a href="www.google.com">Google</a>. Is it possible to hide the link reference (<a href="www.google.com">) and allow the user to select "Google" instead?
Thanks,
Josh
|
|
|
|
|
|
I am having trouble finding what you are referring to. I am searching for "rich text box arbitrary link" but it does not yield any appropriate results, nor does "richtextbox arbitrary link." Can you please elaborate or provide a link?
Edit: I found the page you are referring to. It's http://www.codeproject.com/cs/miscctrl/RichTextBoxLinks.asp
Thanks,
Josh
-- modified at 23:32 Sunday 16th July, 2006
|
|
|
|
|