Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

michael cohen

@michael cohen
About
Posts
21
Topics
16
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • ajax Html Editor MaxLength [modified]
    M michael cohen

    hey guys i would like to restrict the user from inserting more then 70 letters in the ajax html editor contect can someone help me ?

    modified on Thursday, November 5, 2009 7:06 AM

    ASP.NET html help question

  • reducing image file size
    M michael cohen

    hey i have a site and i bulid administrator section where he can upload Images to the site. the images sould be on Size 532x301 so im resizing them with this method

          Bitmap b;
          Image i;
          Graphics g;
          b = new Bitmap(width, height);
          i = Image.FromHbitmap(b.GetHbitmap());
          g = Graphics.FromImage(i);
         
          g.DrawImage(img, 0f, 0f, width, height);
          g.Dispose();
          img.Dispose();
          return i;
    

    after the resize the image file size is 0.5 MB (it was 5mb before)... i want to reduct the image file size to (100k -200k) so the site could be faster, also i dont have alot of space on my host... can anyone help me ?

    C# graphics help question

  • play you tube on your site
    M michael cohen

    thanx , will use the api!

    ASP.NET tutorial

  • play you tube on your site
    M michael cohen

    hey i have a client that want me to show all his you tube movies on his personal site. i need to get all the movies and display on a list . when i user click a movie i need to display the movie on the client site. maybe someone have a reference to guide ,how to do it ,or how to work with you tube...

    ASP.NET tutorial

  • focus inside a bitmap
    M michael cohen

    hey guys i have a site thats show pictures. i would like to focus on the picture with points that i will post... is it possible ? i tried to find some info about it and i couldnt find something... can someone help me out ?

    ASP.NET graphics help question

  • Reading a wiki page
    M michael cohen

    Hello i have a wss site with wiki pages . i wont to read some info from a wiki page and insert it to a database. i also would like to serach some info words from all the wiki pages in my wss site(like google); Could someone Help me ?

    C# database help question

  • remoting annoying Exception {"Found two different objects associated with the same URI, '/999013af_72e3_42b1_affa_43766d7f541f/Chat'."} [modified]
    M michael cohen

    Hello Help me Please!! the problem occur when : first i run my chat program and it's working well , but when i get out of my program at log back in im getting this error at the server When he try to invoke me some event: {"Found two different objects associated with the same URI, '/999013af_72e3_42b1_affa_43766d7f541f/Chat'."} i just dont know what to do :S here is the client side app.config

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <system.runtime.remoting>
    <application>
    <client>

        <wellknown
           type="IskaMessengerCommanObject.RemotableObejct, IskaMessengerCommanObject"
           url="http://XXXX:7717/Chat"
            />
      </client>
      <channels>
        <channel
           ref="http"
           port="0"
            >
          <clientProviders>
            <formatter ref="soap" />
          </clientProviders>
          <serverProviders>
            <formatter ref="soap" typeFilterLevel="Full" />
          </serverProviders>
        </channel>
      </channels>
    </application>
    

    </system.runtime.remoting>
    </configuration>

    and this is the instance im running from client

    RemotingConfiguration.Configure("c:\\Hafaka\\IskaMessengerUser.exe.config", false);
    RemotableObejct RemoteObject = (RemotableObejct)Activator.GetObject(typeof(RemotableObejct), "http://xxxxxxxxxx:7717/Chat");

    modified on Friday, May 22, 2009 3:47 AM

    C# help xml wcf sysadmin question

  • Remoting -how to decide which Delegate i need to Invoke (Private Msgs)
    M michael cohen

    Hello Im writing a simple messenger and im having trouble with the "Private Messages" i worte the shared object between the clinet and the server later all the clients subscribe to the server events Let Say "User Send Message" event Now ,Let say that User "michael" wants to send Message to "liron" So im iterating in server side on each Subscriber , How can i know which of the subscribers are "liron"? can i find any value that identify "liron "?

    UserSendMsgHandler messageDelegate = null;
    Delegate[] invocationList_ = null;
    try
    {
    invocationList_ = onUserSendMsg.GetInvocationList();
    }
    catch
    {

                }
                if (invocationList\_ != null)
                {
                    lock (this)
                    {
                        foreach (Delegate del in invocationList\_)
                        {
                            try
                            {
                                messageDelegate = (UserSendMsgHandler)del;
                                
                                messageDelegate(Msg,Sender,Receivers\[0\]);
                            }
                            catch
                            {
                                onUserSendMsg -= messageDelegate;
                            }
                        }
                    }
                }
    
    C# question sysadmin tutorial

  • weather web service
    M michael cohen

    Hello Forgive me if this is the wrong section ... maybe someone know a web service that give the weather in the world ? i need it for shcool project... thanx

    C# question

  • Getting an Item Inside Lisboxitem in c#
    M michael cohen

    Hey guys i would like to get the selected item inside the listboxitem and change his look , here is the code of my listbox... i would like to change "FutureExtension" Background or something...

    <ListBox.ItemTemplate>
    <DataTemplate>
    <StackPanel>
    <StackPanel Orientation="Horizontal" >
    <my2:FutureExtension x:Name="T2" Loaded="T2_Loaded" Grid.Row="3" Margin="1,1,10,10"></my2:FutureExtension>
    <my2:FutureExtension x:Name="T3" Loaded="T3_Loaded" Grid.Row="3" Margin="1,1,10,10"></my2:FutureExtension>
    <my2:FutureExtension x:Name="T4" Loaded="T4_Loaded" Grid.Row="3" Margin="1,1,10,10"></my2:FutureExtension>
    </StackPanel>
    <!--<Border Height="20" Background="Black" BorderBrush="Orange" BorderThickness="3">
    </Border>-->
    </StackPanel>

                    </DataTemplate>
               </ListBox.ItemTemplate>
    
    WPF csharp css

  • Using Ocx file on asp.net
    M michael cohen

    hey guys Im working on a project that connect users to a recording server. so i have one ocx file that need to be dragged to a from(win froms), then im using his fucntions (connnecting to the server and so...) i would like to work with that ocx file on asp .net ... is there a way to do it ?

    C# csharp asp-net sysadmin question

  • Activex Control -&gt;Running Programaticly [modified]
    M michael cohen

    Hello Im Having some problems with a ocx file i got from the company im working with... basically the control is working with winforms,but i dont want to use this control on a win forms, i want to use on a simple console app... can someone guide me what to do? this is the only code im using in win forms... axVCLogAgent1.RecServerIPAddress = "172.20.1.189"; axVCLogAgent1.RecServerPort = 3001; axVCLogAgent1.VL_connect_rec_server(); axVCLogAgent1.AgentID = UserProperties.AgentId; axVCLogAgent1.Extension = UserProperties.Extension; axVCLogAgent1.VL_log_in(); axVCLogAgent1.VL_start_record();

    modified on Sunday, September 7, 2008 5:06 AM

    COM csharp winforms com tutorial question

  • Add controls to a tab page at run-time
    M michael cohen

    may be this code could help you... // use this one to find a control on you tabcontrol tabControl1.Controls.Find("Control"); //use this one to see if there any controls on the tab page tabControl1.Controls.Count Or //getting the number of tab pages... tabControl1.TabCount

    C# design help

  • Gdi+ Memory Leak &gt;Scrolling text
    M michael cohen

    thanx for checking the code. ill try to do as you say...

    C# graphics winforms json performance announcement

  • Add controls to a tab page at run-time
    M michael cohen

    this is something i made a few days ago... private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { RefreshList(); switch (tabControl1.SelectedIndex) { case 0: tabPage1.Controls.Add(groupBox2); tabPage1.Controls.Add(groupBox1); break; case 1: tabPage2.Controls.Add(groupBox2); tabPage2.Controls.Add(groupBox1); break; case 2: tabPage3.Controls.Add(groupBox2); tabPage3.Controls.Add(groupBox1); break; default: break; } }

    C# design help

  • Gdi+ Memory Leak &gt;Scrolling text
    M michael cohen

    Hey Guys a few days ago i made a custom control that uses GDI+. after playing this control on the screen for 4 hours+ the cpu is getting 50% more Work and Memory Keep Leaking ... after that the text is moving very slow and so on... Here is my code

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using System.IO;
    using ScreenerViewer.BL.NewsBar;
    namespace ScreenerViewer
    {

    public partial class NewsBar : Control
    {
        //timer 
        Timer t = new Timer();
        //position the text
        int Position;
        //normall mode text
        StringWriter SdisplayNormalMode = null;
        //Flicker Mode Text
        StringWriter SdisplayFlickerMode = null;
        //Separate the Text
        string sSeparatesign = " \* ";
        //Use it for Rest Position
        bool bRestPosition = false;
        // Backround Color For NormalMode
        Brush Backroundbrush = Brushes.Red;
        //Backround Color For Normal mode
        Brush BackroundFlickBrush = Brushes.Yellow;
        //Font color for flickermode
        Brush FontFlickerBrush =Brushes.Red;
        //counter for color change in flicker mode
        int iColorChange = 0;
        //first run of bar
        bool bFirstRun = false;
        
        Font TextFont = new Font(new FontFamily("arial"), 60);
        //Drawing the Point of the text
        PointF TextPoint = new PointF();
        private bool \_bFilckerMode;
        public bool bFilckerMode
        {
            get { return \_bFilckerMode; }
            set { \_bFilckerMode = value; }
        }
    
        public NewsBar()
        {
            
            InitializeComponent();
            this.SetStyle(ControlStyles.DoubleBuffer, true);
            this.SetStyle(ControlStyles.ResizeRedraw, true);
    
            SdisplayNormalMode =  new StringWriter();
            t.Interval = 10;
            t.Enabled = true;
            t.Tick += new EventHandler(t\_Tick);
            Position = 0;
            bFirstRun = true;
            
        }
    
        void t\_Tick(object sender, EventArgs e)
        {
          Position+=2;
          Invalidate();
         // Update();
        }
    
        protected override void OnPaint(PaintEventArgs pe)
        {
            
            if (!this.bFilckerMode)
            {
                   //NormalMode
                    pe.Graphics.FillRectangle(Backroundbrus
    
    C# graphics winforms json performance announcement

  • cleaing memory on client side -javascript
    M michael cohen

    Hey Well i have like 300 computers on my network and most of them are running on windows 98 . my friend build a web application that asks the user for a catalog number and in javasciprt it display the "catalognum.jpg" the problem is that after the user load something like 20 pictures the page is not showing more pictures,it's look like that there is no memory .... here is most of the code function myfunction(filpath) { if (filpath !== "") { imgtasrit.src = "DocLib/"+filpath+".jpg"; } else { imgtasrit.src = "image003.gif"; } } /script> ..... input type = button value="??? ?????" onclick="myfunction(form1.tb1dk.value)" align="right" id="Button1" > i just wondering if there is way to clean the memory on client side ?

    ASP.NET javascript sysadmin tools performance help

  • ASP.NET & Sharepoint error when adding control to a project
    M michael cohen

    hello I develop a tool that display some charts,i used a charts control ,and a webchart.dll was added to my project ,when i run the project from visual studio i can see all the charts and the project is working well! i also added the project to sharepoint web part. the problem is when i viewing the site from another computer this is the error i get btw i develop before some webparts , this is the first time im using outside control... HELP ME!!! Required permissions cannot be acquired. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Security.Policy.PolicyException: Required permissions cannot be acquired. [PolicyException: Required permissions cannot be acquired.] System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +2770052 System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +57 [FileLoadException: Could not load file or assembly 'WebChart, Version=1.1.1.4, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)] System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0 System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +54 System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +211 System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141 System.Reflection.Assembly.Load(String assemblyString) +25 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +32

    ASP.NET help csharp asp-net sharepoint visual-studio

  • thread closing connection
    M michael cohen

    Hey im having a problem with threads and Connections. When the user loging to my program im trying to update the status bar. just a small loop that will run for 7 sec (avg), but when im sending the loging info to the database with a thread, the thread is closing my connection and fail. *.when im not using threads all working good. *.im using oracle 8 database. *.is there someting i need to do with the connection string ? btw i know how to work with threads it's just dont working with a connections

    C# database oracle help tutorial question

  • problem with Report Viewer In windows 98
    M michael cohen

    the code is c# ,i dont know what is main report... and i dont know where can i find the log file...

    C# help database sysadmin career
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups